﻿<UserControl x:Class="Assembly.Metro.Controls.PageTemplates.Games.Components.RssPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="800">
    <Grid>
        <ListBox x:Name="tutorialRSSList" ItemsSource="{Binding}" 
            IsSynchronizedWithCurrentItem="True" Margin="10"
            Visibility="Visible" Background="{x:Null}" Foreground="{x:Null}" BorderBrush="{x:Null}" MouseDoubleClick="tutorialRSSList_MouseDoubleClick">
            <ListBox.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" 
                         Color="{DynamicResource ExtryzeAccentBrushColourSecondary}" />
            </ListBox.Resources>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="10,5,0,5">
                        <StackPanel HorizontalAlignment="Left" VerticalAlignment="Stretch">
                            <TextBlock Style="{DynamicResource GenericTextblock}" FontSize="16" Text="{Binding Title}" />
                            <StackPanel Orientation="Horizontal" Margin="2,2,0,0">
                                <TextBlock Style="{DynamicResource GenericTextblock}" FontSize="12" Text="Posted On:" />
                                <TextBlock Style="{DynamicResource GenericTextblock}" Margin="2,0,0,0" FontSize="12" Text="{Binding FriendlyPubDate}" FontFamily="{DynamicResource MetroFontSemiBold}" />
                            </StackPanel>
                            
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        
        <Grid x:Name="gridNoConnection" Margin="20,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Visibility="Collapsed">
            <TextBlock Text="No internet connection, unable to pull Tutorials from XboxChaos." Style="{DynamicResource GenericTextblock}" FontSize="22" FontFamily="{DynamicResource MetroFontLight}"/>
        </Grid>
    </Grid>
</UserControl>
